package xml;

import java.util.List;

import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;

public class XPathTest {

	public static void main(String[] args) throws DocumentException {
		SAXReader reader = new SAXReader();
		Document doc = reader.read(XPathTest.class.getResource("BJITDYiZhuang.xml"));
		List<Element> elements = doc.selectNodes("/ibm.dcmmt.layout/class[@type='TILE_INFO']");
		System.out.println(elements);
//		List<Element> element1 = doc.selectNodes("//record");
//		System.out.println(element1);
		elements = doc.selectNodes("/ibm.dcmmt.layout/class[@type='PERF' or @type='ACU']");
		System.out.println(elements);
	}
}
